import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity({ name: 'product_sku' })
class ProductSkuEntity {
  @PrimaryGeneratedColumn({ zerofill: true })
  skuId: number;

  @Column('json', { nullable: true })
  specs: string; //商品可选规格

  @Column('int', { width: 8 })
  price: number;

  @Column('int', { width: 8 })
  stock: number;

  @Column('int', { width: 8, zerofill: true })
  productId: number;
}

export default ProductSkuEntity;